﻿
/*----------------------------------------------------------------//
// 文件名：MoEquipMaintainLog.cs
// 文件功能描述：实体 MoEquipMaintainLog.
// 
// 创建标识：2009-02-27
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoEquipMaintainLog
using System;
using System.Data;
using System.Globalization;
using System.Text;
using System.Xml;
using System.Data.Common;
namespace EQT.Model
{
	/// <summary>
	/// 业务实体MoEquipMaintainLog
	/// </summary>
	public partial class MoEquipMaintainLog:ICloneable
	{
		#region 表EquipMaintainLog的字段
		private int _equi_mtn_id;
		private string _equip_id;
		private string _emp_id;
		private DateTime _mtn_date;
		private string _mtn_info;
		#endregion
		
		#region 构造函数
		public MoEquipMaintainLog()
		{
		    
		    
		    
		    _mtn_date= DateTime.Now;
		    
		}
		#endregion
		
		#region 拷贝构造函数

		public MoEquipMaintainLog(MoEquipMaintainLog item)
		{
			item.CopyTo(this);
		}
		#endregion
		
		#region 带参数构造函数
	    public MoEquipMaintainLog(int equi_mtn_id,string equip_id,string emp_id,DateTime mtn_date,string mtn_info)
		{
		this._equi_mtn_id=equi_mtn_id;
		this._equip_id=equip_id;
		this._emp_id=emp_id;
		this._mtn_date=mtn_date;
		this._mtn_info=mtn_info;
		}
		#endregion
		
		#region 表EquipMaintainLog的字段属性
		/// <summary>
		/// EQUI_MTN_ID
		/// </summary>
		public int Equi_Mtn_Id
		{
			get {return _equi_mtn_id;}
			set {_equi_mtn_id=value;}
		}
		/// <summary>
		/// EQUIP_ID
		/// </summary>
		public string Equip_Id
		{
			get {return _equip_id;}
			set {_equip_id=value;}
		}
		/// <summary>
		///人员序号是自增序列。人员编码使用触发器实现。   E0001,E0002
		/// </summary>
		public string Emp_Id
		{
			get {return _emp_id;}
			set {_emp_id=value;}
		}
		/// <summary>
		/// MTN_DATE
		/// </summary>
		public DateTime Mtn_Date
		{
			get {return _mtn_date;}
			set {_mtn_date=value;}
		}
		/// <summary>
		/// MTN_INFO
		/// </summary>
		public string Mtn_Info
		{
			get {return _mtn_info;}
			set {_mtn_info=value;}
		}
		#endregion
		
		#region 辅助函数
		/// <summary>
		/// 拷贝函数
		/// </summary>
		public MoEquipMaintainLog CopyTo(MoEquipMaintainLog item)
        {
		    item.Equi_Mtn_Id=this.Equi_Mtn_Id;
		    item.Equip_Id=this.Equip_Id;
		    item.Emp_Id=this.Emp_Id;
		    item.Mtn_Date=this.Mtn_Date;
		    item.Mtn_Info=this.Mtn_Info;
			return item;
        }
		/// <summary>
		/// 克隆函数
		/// </summary>		
		public object Clone()
        {
            MoEquipMaintainLog NewEquipMaintainLog=new MoEquipMaintainLog();
		    NewEquipMaintainLog._equi_mtn_id=this._equi_mtn_id;
		    NewEquipMaintainLog._equip_id=this._equip_id;
		    NewEquipMaintainLog._emp_id=this._emp_id;
		    NewEquipMaintainLog._mtn_date=this._mtn_date;
		    NewEquipMaintainLog._mtn_info=this._mtn_info;
			return NewEquipMaintainLog;
		}
		
		private static MoEquipMaintainLog _empty = new MoEquipMaintainLog(-1,string.Empty,string.Empty,DateTime.MinValue,string.Empty);
        public static MoEquipMaintainLog Empty
        {
            get
            {
                return _empty;
            }
        }
		
		///<summary>
		///判断对象是否相等
		///<summary>
		public override bool Equals(object obj)
        {
            if (base.Equals(obj))
            {
                return true;
            }
            else
            {
                MoEquipMaintainLog NewEquipMaintainLog = obj as MoEquipMaintainLog;
                if (NewEquipMaintainLog == null)
                {
                    return false;
                }
                else
                {
				if (NewEquipMaintainLog.Equi_Mtn_Id==this.Equi_Mtn_Id && NewEquipMaintainLog.Equip_Id==this.Equip_Id && NewEquipMaintainLog.Emp_Id==this.Emp_Id && NewEquipMaintainLog.Mtn_Date==this.Mtn_Date && NewEquipMaintainLog.Mtn_Info==this.Mtn_Info)		
					{
                        return true; 
                    }
                }

            }
            return false;
            
        }
		///TODO:you should modify GetHashCode by yourself.
		public override int GetHashCode()
		{
			return base.GetHashCode();
		} 

		public override string ToString()
        {
		   return String.Format("Equi_Mtn_Id={0}/Equip_Id={1}/Emp_Id={2}/Mtn_Date={3}/Mtn_Info={4}",_equi_mtn_id,_equip_id,_emp_id,_mtn_date,_mtn_info);
		 
		}
		#endregion
		
		#region DataTable Help Function
		///<summary>
		///DataRow转换成Model
		///</summary>
		public void Row2Model(DataRow row)
		{
		    if(row["Equi_Mtn_ID"]!=null && row["Equi_Mtn_ID"]!=DBNull.Value)
			{
			    this.Equi_Mtn_Id = (int)row["Equi_Mtn_ID"];
			}
			else
			{
				this.Equi_Mtn_Id =-1;
			}
		    if(row["Equip_ID"]!=null && row["Equip_ID"]!=DBNull.Value)
			{
			    this.Equip_Id = (string)row["Equip_ID"];
			}
			else
			{
				this.Equip_Id =string.Empty;
			}
		    if(row["Emp_ID"]!=null && row["Emp_ID"]!=DBNull.Value)
			{
			    this.Emp_Id = (string)row["Emp_ID"];
			}
			else
			{
				this.Emp_Id =string.Empty;
			}
		    if(row["Mtn_Date"]!=null && row["Mtn_Date"]!=DBNull.Value)
			{
			    this.Mtn_Date = (DateTime)row["Mtn_Date"];
			}
			else
			{
				this.Mtn_Date =DateTime.MinValue;
			}
		    if(row["Mtn_Info"]!=null && row["Mtn_Info"]!=DBNull.Value)
			{
			    this.Mtn_Info = (string)row["Mtn_Info"];
			}
			else
			{
				this.Mtn_Info =string.Empty;
			}
		}
		
		///<summary>
		///Model转换成DataRow
		///</summary>
	　　public void Model2Row(DataRow row)
		{
			row["Equi_Mtn_ID"] = this.Equi_Mtn_Id;
			row["Equip_ID"] = this.Equip_Id;
			row["Emp_ID"] = this.Emp_Id;
			row["Mtn_Date"] = this.Mtn_Date;
			row["Mtn_Info"] = this.Mtn_Info;
		}
		#endregion
	}
}
#endregion
